package com.base.pojo;

/**
 * this is a class demo.
 *
 * @author pretty_boy
 * @date 2018/9/26 16:16
 */
public class Test {
    private static Fruit fruit;

    /**
     * 此处不能为空，如果为null，则不算是一个对象实例
     */
    private static Apple apple = new Apple();

    public static void main(String[] args) {
        if (apple instanceof Fruit) {
            System.out.println("苹果是水果。。。");
        }else {
            System.out.println("不是水果");
        }

        System.out.println(Apple.Color.RED);
    }
}
